home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / etc / init.d / sendsigs < prev    next >
Encoding:
Text File  |  2007-04-10  |  800 b   |  48 lines

  1. #! /bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides:          sendsigs
  4. # Required-Start:    
  5. # Required-Stop: 
  6. # Default-Start:     6
  7. # Default-Stop:       
  8. # Short-Description: Kill all remaining processes.
  9. # Description: 
  10. ### END INIT INFO
  11.  
  12. PATH=/usr/sbin:/usr/bin:/sbin:/bin
  13.  
  14. . /lib/lsb/init-functions
  15.  
  16. do_stop () {
  17.     # Kill all processes.
  18.     log_action_begin_msg "Terminating all remaining processes"
  19.     killall5 -15
  20.     log_action_end_msg 0
  21.     sleep 5
  22.     log_action_begin_msg "Sending all processes the KILL signal"
  23.     killall5 -9
  24.     log_action_end_msg 0
  25. }
  26.  
  27. case "$1" in
  28.   start)
  29.     # No-op
  30.     ;;
  31.   restart|reload|force-reload)
  32.     echo "Error: argument '$1' not supported" >&2
  33.     exit 3
  34.     ;;
  35.   stop)
  36.     do_stop
  37.     if which usplash_down >/dev/null; then
  38.         usplash_down
  39.     fi
  40.     ;;
  41.   *)
  42.     echo "Usage: $0 start|stop" >&2
  43.     exit 3
  44.     ;;
  45. esac
  46.  
  47. :
  48.